#include "Canvas.h"

#include "direct2d_1.h"
#include "extern.h"


cCanvas g_Canvas;

Render::Render() : m_x(0), m_y(0), m_Width(0), m_Height(0), m_NeedShow(true) {
    m_PreShowRect = this;
}

void Render::render(Maper* maper) {
    if (!m_NeedShow) {
        return;
    }
    if (maper != nullptr) {
        // render(maper->m_xCenter - g_400, maper->m_yCenter - g_300);
    } else {
        render(0, 0);
    }
}


cCanvas::~cCanvas() {

}


bool cCanvas::Init() {
    return true;
}

bool cCanvas::Add(Render* pPic, int showmode, bool bCover) {
    if (pPic->m_NeedShow) {
        pPic->render(0, 0);
    }
    return true;
}

bool cCanvas::Show() {
    return true;
}


